package edu.jd.login;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LoginDao {

    @Select("select user_id, user.role_id, role_name, password " +
            "from user, role " +
            "where user_id = #{user_id} " +
            "and password = #{password} " +
            "and user.role_id = role.role_id")
    public List<User> getUserByIdAndPassword(@Param("user_id") String user_id, @Param("password") String password);
}
